﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using XDL.Framework.Particles;

namespace JumpNFight.Weapons
{
    class ShotgunWeaponSystem : BulletWeaponSystemBase
    {
        public ShotgunWeaponSystem(Game game) :
            base(game)
        { }

        protected override string BulletPSName
        {
            get { return "Particles/ShotgunBullet"; }
        }

        protected override string WeaponName
        {
            get { return "Weapons/Shotgun"; }
        }

        protected override int BulletCount
        {
            get
            {
                return 10;
            }
        }

        protected override int ShellCount
        {
            get
            {
                return 2;
            }
        }

        protected override bool Hit(Simulation.Intersection intersection, int tag, ref ParticleVertex particle, Vector3 position, Vector3 normalizedDirection, float distance)
        {
            base.Hit(intersection, tag, ref particle, position, normalizedDirection, distance);
            // stop only half of the bullets!
            return Rnd.Next(2) == 0;
        }
    }
}
